//
//  CommonTools.swift
//  weibo
//
//  Created by Limonwei on 15/12/5.
//  Copyright © 2015年 heima. All rights reserved.
//

import UIKit

//快速创建一个颜色

func RGB(red red: CGFloat, green: CGFloat, blue: CGFloat) ->UIColor{
    
    
    return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: 1)
}


//随机颜色

func RandomColor() -> UIColor {
    
    return RGB(red: CGFloat(random() % 256), green: CGFloat(random() % 256), blue: CGFloat(random() % 256))
}